package com.example.mobile2021606145zbq0407homework;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

    private TextView tvMainTitle;
    private Button btnAdd;
    private Button btnGetMax;
    private Button btnPasswordPoyi;
    private Button btnTemperature;
    private Button btnFenduanhanshu;
    private Button btnGrades;
    private Button btnNumber;
    private Button btnLirun;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
        btnAdd.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this,MainActivity2.class);
                startActivity(intent);
            }
        });
        btnGetMax.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this,MainActivity3.class);
                startActivity(intent);
            }
        });
        btnPasswordPoyi.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this,MainActivity4.class);
                startActivity(intent);
            }
        });
        btnTemperature.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this,MainActivity5.class);
                startActivity(intent);
            }
        });
        btnFenduanhanshu.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this,MainActivity6.class);
                startActivity(intent);
            }
        });
        btnGrades.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this,MainActivity7.class);
                startActivity(intent);
            }
        });
        btnNumber.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this,MainActivity8.class);
                startActivity(intent);
            }
        });
        btnLirun.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this,MainActivity9.class);
                startActivity(intent);
            }
        });
    }

    private void initView() {
        tvMainTitle = (TextView) findViewById(R.id.tv_main_title);
        btnAdd = (Button) findViewById(R.id.btn_add);
        btnGetMax = (Button) findViewById(R.id.btn_get_max);
        btnPasswordPoyi = (Button) findViewById(R.id.btn_password_poyi);
        btnTemperature = (Button) findViewById(R.id.btn_temperature);
        btnFenduanhanshu = (Button) findViewById(R.id.btn_fenduanhanshu);
        btnGrades = (Button) findViewById(R.id.btn_Grades);
        btnNumber = (Button) findViewById(R.id.btn_number);
        btnLirun = (Button) findViewById(R.id.btn_lirun);
    }
}